#include <stdio.h>
#include <string.h>

int main0()
{
    char a[100] = "abc";
    char b[100] = "12344";
    //把b的内容拷贝到a里面
    
    int index = 0;
    while(b[index])
    {
        a[index] = b[index];
        index++;
    }
    printf("%s\n", a);
    return 0;
}

int main1()
{
    char a[100] = "abc";
    char b[100] = "fadjflkaj12344";
    strcpy(a, b);
    printf("%s\n", a);
    return 0;
}
int main()
{
    char a[100] = "abc";
    char b[100] = "123fjalkdjflkjsf44";
    //strncpy(a, b, 5);
    strncpy(a, b, sizeof(a) - 1);
    printf("%s\n", a);
    return 0;
}
